{% extends "base.html" %}

{% load i18n %}
{% load humanize %}
{% load pagination_tags %}
{% load cache %}

{% block extra_metas %}
  <meta name="description" content="{% trans "Read the Docs simplifies technical documentation by automating building, versioning, and hosting for you. Build up-to-date documentation for the web, print, and offline use on every version control push automatically." %}">
{% endblock extra_metas %}

{% block title %}{% trans "Home" %}{% endblock %}

{% block body_class %}home {% if not request.user.is_authenticated %}splash{% endif %}{% endblock %}

{% block nav-browse %}class="active"{% endblock %}

{% block header-wrapper %}
  {% if request.user.is_authenticated %}
    {% include "core/header.html" %}
  {% else %}
    {% include "core/home-header.html" %}
  {% endif %}
{% endblock %}

{% block extra_scripts %}
        <script>
    $(document).ready(function() {
            // Show action on hover
            $(".module-item-menu").hover(
              function () {
                $(".hidden-child", this).show();
              }, function () {
                $(".hidden-child", this).hide();
              }
            );
    });
        </script>
{% endblock %}


{% block content %}

  <!-- Lead -->
  <section>
    <h2>{% trans "Technical documentation lives here" %}</h2>
    <p class="lead">
      {% blocktrans trimmed %}
      Read the Docs simplifies software documentation by automating building,
      versioning, and hosting of your docs for you.
      {% endblocktrans %}
    </p>
  </section>


  <section>
    <div class="feature">
      <h3>Free docs hosting</h3>
      <p>
        {% with projects_count_intcomma=projects_count|intcomma %}
        {% blocktrans trimmed %}
        We will host your documentation for free forever.
        There are no tricks. We help {{ projects_count_intcomma }} open source projects
        share their docs.
        {% endblocktrans %}
        {% endwith %}
      </p>
    </div>
    <div class="feature">
      <h3>Webhooks</h3>
      <p>
        {% blocktrans trimmed %}
        Whenever you push code to your favorite version control system,
        whether that is Git, Mercurial, Bazaar, or Subversion, we will
        automatically build your docs so your code and documentation are
        never out of sync.
        {% endblocktrans %}
      </p>
    </div>
    <div class="clearfix"></div>
  </section>

  <section>
    <div class="feature">
      <h3>Multiple formats</h3>
      <p>
        {% blocktrans trimmed %}
        Of course we build and host your docs for the web, but they are
        also vieweable as PDFs, as single page HTML, and for eReaders.
        No additional configuration is required.
        {% endblocktrans %}
      </p>
    </div>
    <div class="feature">
      <h3>Multiple versions</h3>
      <p>
        {% blocktrans trimmed %}
        We can host and build multiple versions of your docs so having a
        1.0 version of your docs and a 2.0 version of your docs is as easy
        as having a separate branch or tag in your version control system.
        {% endblocktrans %}
      </p>
    </div>
    <div class="clearfix"></div>
  </section>

  <!-- Call to action -->
  <section>
    <p style="text-align: center">
      <a href="https://docs.readthedocs.io/en/latest/getting_started.html" class="cta-btn">{% trans 'Getting started guide' %}</a>
    </p>
  </section>

  <!-- Search -->
  <section>
    {% include "core/widesearchbar.html" %}
  </section>

  {% if featured_list %}
  {% get_current_language as language %}
  {% cache 600 homepage_featured_list language %}
    <!-- BEGIN projects list -->
    <section>
      <h3>{% trans "Featured Projects" %}</h3>
      <div class="module-list">
        <div class="module-list-wrapper">
          <ul style="margin-bottom: 0">
            {% include "core/project_list_featured.html" %}
          </ul>
        </div>
      </div>
    </section>
    <!-- END projects list -->
  {% endcache %}
  {% endif %}

  <!-- Funding and Contributing -->
  <section>
    <h2>{% trans "Read the Docs is funded by the community" %}</h2>
    <p>

    {% url "advertising" as advertising_url %}
    {% url "donate" as sponsors_url %}
    {% url "gold_detail" as gold_detail %}

    {% blocktrans trimmed %}
    Read the Docs is a huge resource that millions of developers rely on
    for software documentation. It would not be possible without the
    support of our
    <a href="{{ sponsors_url }}">sponsors</a>,
    <a href="{{ advertising_url }}">advertisers</a>,
    and <a href="{{ gold_detail }}">readers like you</a>.
    {% endblocktrans %}
    </p>

    <p>
      {% blocktrans trimmed %}
      Read the Docs is <strong>community supported</strong>.
      It depends on users like you to contribute to development, support, and operations.
      You can learn more about how to <a href="https://docs.readthedocs.io/en/latest/contribute.html">contribute</a> in our docs.
      Thanks so much to our wonderful <a href="https://docs.readthedocs.io/en/latest/team.html">community team</a> who helps us run the site.
      Read the Docs wouldn't be possible without them.
      {% endblocktrans %}
    </p>

    <p>
      {% blocktrans trimmed %}
      Hosting for the project is graciously provided by <a href="https://azure.microsoft.com/">Microsoft Azure</a>.
      {% endblocktrans %}
    </p>
  </section>
{% endblock %}
